
import requests
from basic.config import GlobalCfg


class Spider(object):
    
    def __init__(self, proxies=None):
        self.proxies = proxies
    
    def get_text(self, url):
        res = requests.get(url, verify=False, proxies=self.proxies)
        return res.text

    def get_json(self, url):
        res = requests.get(url, verify=False, proxies=self.proxies)
        return res.json()


